package questionnaire;

import java.util.Arrays;

/**
 * classe permetttant de construire une question
 * @author matthieujimenez
 *
 */
public class Question {
    private String intitule;
    private String[] reponse;

    private int bonneReponse;

    /**
     * 
     */
public Question (String intitule, String reponseA, String reponseB,String reponseC,String reponseD,int bonnerep){
    this.intitule=intitule;
    reponse= new String[4]; 
    reponse[0]=reponseA;
    reponse[1]=reponseB;
    reponse[2]=reponseC;
    reponse[3]=reponseD;
    this.bonneReponse=bonnerep;
}
public boolean bonneReponse(int reponsePropose){
    return reponsePropose == bonneReponse;
}

    public String getIntitule() {
        return intitule;
    }

    public String[] getReponse() {
        return reponse;
    }



    public int getBonneReponse() {
        return bonneReponse;
    }
    public String toString(){
        return ("question: "+ intitule +" reponse "+ Arrays.toString(reponse) + "et la bonne reponse" +bonneReponse);
    }
}
